home *** CD-ROM | disk | FTP | other *** search
- ; 私製ライブラリ・グラフィック篇
- ; (c) MATSUUCHI Ryosuke in Dec,1992
- ;
- ; gscreen.asm : 画面モードの設定
- ;
- ; 1992.12.28(Sun)
-
-
- public gscreen, _gscreen
- extrn _gwrtpage:near
-
- include grplib.inc
-
-
- assume cs:cseg, ds:dseg
-
-
- dseg segment dword 'DATA'
- dseg ends
-
-
-
- cseg segment dword 'CODE'
-
- ;---------------------------------------------------------------
- ; _gscreen : 画面モードの設定(現在の書き込みページ)
- ; in AL:画面モード
- ;
- ; void gscreen(int mode);
- ;---------------------------------------------------------------
-
-
-
- gscreen proc
- mov eax,[esp+4]
- call _gscreen
- ret
- gscreen endp
-
-
-
- _gscreen proc
- push eax
- push edx
- mov edx,[_wrtpage]
- bt edx,7
- jc #0
- ;書き込みページが実画面の場合
- mov ah,01h
- mov byte ptr [_scrmod+edx*4],al
- mov byte ptr [_nowscrmod],al
- xor edx,edx
- mov dl,al
- mov al,byte ptr [_wrtpage]
- call _callEGB
- ;★ BIOS 01H が書き込みページを変更するようなので、元にもどす
- mov eax,[_wrtpage]
- call _gwrtpage
- jmp #1
- #0:
- ;書き込みページが仮想画面の場合
- and edx,7fh
- and eax,0ffh
- mov [_vscrmod+edx*4],eax
- mov [_nowscrmod],eax
- #1:
- pop edx
- pop eax
- ret
- _gscreen endp
-
-
-
- cseg ends
-
- end
-